// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Linq;
using Elastic.Clients.Elasticsearch.Serialization;

namespace Elastic.Clients.Elasticsearch.MachineLearning;

[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.MachineLearning.Json.DataframeAnalyticsAuthorizationConverter))]
public sealed partial class DataframeAnalyticsAuthorization
{
#if NET7_0_OR_GREATER
	public DataframeAnalyticsAuthorization()
	{
	}
#endif
#if !NET7_0_OR_GREATER
	public DataframeAnalyticsAuthorization()
	{
	}
#endif
	[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
	internal DataframeAnalyticsAuthorization(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel)
	{
		_ = sentinel;
	}

	/// <summary>
	/// <para>
	/// If an API key was used for the most recent update to the job, its name and identifier are listed in the response.
	/// </para>
	/// </summary>
	public Elastic.Clients.Elasticsearch.MachineLearning.ApiKeyAuthorization? ApiKey { get; set; }

	/// <summary>
	/// <para>
	/// If a user ID was used for the most recent update to the job, its roles at the time of the update are listed in the response.
	/// </para>
	/// </summary>
	public System.Collections.Generic.IReadOnlyCollection<string>? Roles { get; set; }

	/// <summary>
	/// <para>
	/// If a service account was used for the most recent update to the job, the account name is listed in the response.
	/// </para>
	/// </summary>
	public string? ServiceAccount { get; set; }
}